#ifndef ANIMATEDBUTTON_H
#define ANIMATEDBUTTON_H

#include <QPushButton>
#include <QPropertyAnimation>
#include <QDebug>

#define ANIMATIONSTEPS 20

class AnimatedButton : public QPushButton
{
    Q_OBJECT
    Q_PROPERTY(int animationStep READ animationStep WRITE setAnimationStep)

public:
    explicit AnimatedButton(QWidget *parent = 0);
    ~AnimatedButton();

    void setAnimationStep(int step);
    int animationStep();

protected:
    void enterEvent(QEvent *);
    void leaveEvent(QEvent *);

private:
    int m_animationStep;
    QPropertyAnimation* m_animation;

    void setDefaultStyleSheet();
    
signals:
    
public slots:
    
};

#endif // ANIMATEDBUTTON_H
